﻿<?xml version="1.0" encoding="utf-8"?>
<Schema Namespace="ModelRailway" Alias="Self" annotation:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
  <EntityType Name="Roads">
    <Key>
      <PropertyRef Name="roadID" />
    </Key>
    <Property Name="roadID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="nameRoad" Type="String" MaxLength="40" FixedLength="false" Unicode="true" Nullable="false" />
    <Property Name="typeRoad" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
    <Property Name="categoryQuality" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
    <NavigationProperty Name="Stations" Relationship="Self.Stations_Roads" FromRole="Roads" ToRole="Stations" />
  </EntityType>
  <EntityType Name="Stations">
    <Key>
      <PropertyRef Name="stationID" />
    </Key>
    <Property Name="stationID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="nameStation" Type="String" MaxLength="40" FixedLength="false" Unicode="true" Nullable="false" />
    <Property Name="image" Type="Binary" MaxLength="Max" FixedLength="false" />
    <Property Name="overheadTransition" Type="Boolean" Nullable="false" />
    <Property Name="location" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
    <NavigationProperty Name="TypeStation" Relationship="Self.FK_Stations" FromRole="Stations" ToRole="TypeStation" />
    <NavigationProperty Name="Roads" Relationship="Self.Stations_Roads" FromRole="Stations" ToRole="Roads" />
  </EntityType>
  <EntityType Name="TypeStation">
    <Key>
      <PropertyRef Name="typeStationID" />
    </Key>
    <Property Name="typeStationID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="nameTypeStation" Type="String" MaxLength="40" FixedLength="false" Unicode="true" Nullable="false" />
    <Property Name="passagerService" Type="Boolean" Nullable="false" />
    <NavigationProperty Name="Stations" Relationship="Self.FK_Stations" FromRole="TypeStation" ToRole="Stations" />
  </EntityType>
  <EntityType Name="AuthorizationTable">
    <Key>
      <PropertyRef Name="login" />
      <PropertyRef Name="password" />
    </Key>
    <Property Name="login" Type="String" MaxLength="20" FixedLength="false" Unicode="false" Nullable="false" />
    <Property Name="password" Type="String" MaxLength="8" FixedLength="false" Unicode="false" Nullable="false" />
  </EntityType>
  <Association Name="FK_Stations">
    <End Role="TypeStation" Type="Self.TypeStation" Multiplicity="1" />
    <End Role="Stations" Type="Self.Stations" Multiplicity="*" />
  </Association>
  <Association Name="Stations_Roads">
    <End Role="Stations" Type="Self.Stations" Multiplicity="*" />
    <End Role="Roads" Type="Self.Roads" Multiplicity="*" />
  </Association>
  <EntityContainer Name="EntitiesRailway" annotation:LazyLoadingEnabled="true">
    <EntitySet Name="Roads" EntityType="Self.Roads" />
    <EntitySet Name="Stations" EntityType="Self.Stations" />
    <EntitySet Name="TypeStation" EntityType="Self.TypeStation" />
    <EntitySet Name="AuthorizationTable" EntityType="Self.AuthorizationTable" />
    <AssociationSet Name="FK_Stations" Association="Self.FK_Stations">
      <End Role="TypeStation" EntitySet="TypeStation" />
      <End Role="Stations" EntitySet="Stations" />
    </AssociationSet>
    <AssociationSet Name="Stations_Roads" Association="Self.Stations_Roads">
      <End Role="Stations" EntitySet="Stations" />
      <End Role="Roads" EntitySet="Roads" />
    </AssociationSet>
  </EntityContainer>
</Schema>